home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume22 / undel2 / patch10 < prev    next >
Encoding:
Internet Message Format  |  1990-06-07  |  29.7 KB

  1. Subject:  v22i105:  MIT Athena delete/undelete programs, release 2, Patch10
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: ddc94a11 cb657a39 d4849113 e68fac4f
  5.  
  6. Submitted-by: "Jonathan I. Kamens" <jik@pit-manager.mit.edu>
  7. Posting-number: Volume 22, Issue 105
  8. Archive-name: undel2/patch10
  9. Patch-To: volume22/undel2
  10.  
  11. [  DON'T PANIC!  The undel2 posting earlier in this volume was at
  12.    patchlevel 9.  --r$  ]
  13.  
  14.   The following is official patch number 10 to the "undel" package
  15. recently posted to comp.sources.unix.  Please apply it.
  16.  
  17.   Unshar the shar below, and feed the resulting file to patch with
  18. your current working directory set to the directory in which your
  19. undel sources reside.
  20.  
  21.   This patch accomplishes the following:
  22.  
  23. 1. The README file is updated.
  24. 2. The Makefile is updated to make it easier to customize for other
  25.    sites.
  26. 3. Several modifications are made in order to accommodate System V
  27.    environments better.
  28. 4. A couple of files have some debugging code added to them.
  29.  
  30. Jonathan Kamens                          USnail:
  31. MIT Project Athena                11 Ashford Terrace
  32. jik@Athena.MIT.EDU                Allston, MA  02134
  33. Office: 617-253-8495                  Home: 617-782-0710
  34.  
  35. #! /bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of shell archive."
  42. # Contents:  delete.patch10
  43. # Wrapped by jik@pit-manager on Fri Jun  8 00:13:30 1990
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'delete.patch10' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'delete.patch10'\"
  47. else
  48. echo shar: Extracting \"'delete.patch10'\" \(27287 characters\)
  49. sed "s/^X//" >'delete.patch10' <<'END_OF_FILE'
  50. X*** /tmp/,RCSt1018872    Fri Jun  8 00:10:39 1990
  51. X--- README    Thu Jun  7 22:56:38 1990
  52. X***************
  53. X*** 16,34 ****
  54. X  
  55. X               SUPPORTED PLATFORMS
  56. X  
  57. X! I've personally compiled these sources under 4.3BSD on VAXen and IBM
  58. X! RT/PC's, under Mach on the NeXT Machine, under Ultrix on the
  59. X! DECstation 3100, and under SunOS 4.0, and I assume they should compile
  60. X! with minimal trouble on other architectures.  If you make it compile
  61. X! on another platform and you have to make changes, please send me
  62. X! patches.
  63. X  
  64. X  
  65. X               WHAT YOU NEED TO DO
  66. X  
  67. X! 1. Compile the com_err library (see below for more details) found in
  68. X!    the sub-directory et, and install it if you want to (you'll have to
  69. X!    modify the delete Makefile a bit if you don't).
  70. X  
  71. X  2. Edit the Makefile to fit your site.  See below for details.
  72. X  
  73. X--- 16,36 ----
  74. X  
  75. X               SUPPORTED PLATFORMS
  76. X  
  77. X! I've personally compiled these sources under Vax 4.3BSD, IBM AOS 4.3,
  78. X! Mach on the NeXT Machine (with the "-bsd" flag to the compiler),
  79. X! Ultrix 3.1 on the DECstation 3100, SunOS 4.0, A/UX, and HP-UX, and I
  80. X! assume they should compile with minimal trouble on other architectures
  81. X! (However, I've been told that there may be some problems compiling on
  82. X! POSIX-compliant architectures; they're being worked on.).  If you make
  83. X! it compile on another platform and you have to make changes, please
  84. X! send me patches.
  85. X  
  86. X  
  87. X               WHAT YOU NEED TO DO
  88. X  
  89. X! 1. Compile the com_err library (see below for more details) and
  90. X!    install it if you want to (you'll have to modify the delete
  91. X!    Makefile a bit if you don't).
  92. X  
  93. X  2. Edit the Makefile to fit your site.  See below for details.
  94. X  
  95. X***************
  96. X*** 45,83 ****
  97. X  1. Change the install binary directory and install man page directory
  98. X     (and possibly man section).
  99. X  
  100. X! 2. Change the "-I/usr/include" to point to the et subdirectory if you
  101. X!    have not installed the com_err header file in a standard location,
  102. X!    or to wherever you have installed it.  Change the COMPILE_ET
  103. X!    variable to use et/compile_et if you haven't installed the
  104. X!    compile_et utility.  Change the -L/usr/athena/lib flag to point to
  105. X!    wherever you have installed the library, or to the et subdirectory
  106. X!    if you have not.
  107. X  
  108. X! 3. Deal with the AFS_MOUNTPOINTS flag, which specifies whether
  109. X!    undelete, expunge and lsdel will check for Andrew File System mount
  110. X!    points in addition to standard Unix mount points.
  111. X  
  112. X!    a. If you undefine it, remove the -I and -L flags that point to AFS
  113. X!       includes and libraries, and remove the "-lsys" from the LIBS
  114. X!       variable.
  115. X  
  116. X-    b. If you leave it defined, change the -I and -L flags to point to
  117. X-       wherever you keep your AFS includes and libraries.
  118. X  
  119. X- 
  120. X                 COM_ERR LIBRARY
  121. X  
  122. X! This is the second release of this package.  Unlike the first release,
  123. X! this release requires (for error-handling) a library called com_err,
  124. X! which was written by members of the MIT Student Information Processing
  125. X! Board (SIPB).  Along with that library comes a utility called
  126. X! compile_et.  The sources to the com_err library and compile_et are
  127. X! included with the sources to the delete package; you should compile
  128. X! them and then either install them in a "standard location" on your
  129. X! machine or modify the delete Makefile so that it knows where they are.
  130. X! The delete Makefile does not compile them by default, since they are
  131. X! already compiled and installed at Athena, so you should compile and
  132. X! install them separately from delete etc.
  133. X  
  134. X  The files texinfo.tex and com_err.texinfo in the et sources are
  135. X  compressed and uuencoded because they have control characters in them.
  136. X--- 47,78 ----
  137. X  1. Change the install binary directory and install man page directory
  138. X     (and possibly man section).
  139. X  
  140. X! 2. Change the ETINCS and ETLDFLAGS variables to point to the right
  141. X!    place.  Also, change the COMPILE_ET variable to point to a
  142. X!    compile_et executable if you haven't installed it somewhere in your
  143. X!    search path.
  144. X  
  145. X! 3. If your system is SYSV-like (e.g. it uses strchr and strrchr
  146. X!    instead of index and rindex, or it has memcpy and doesn't have
  147. X!    bcopy), and your compile doesn't define the symbol SYSV
  148. X!    automatically, then put "-DSYSV" in the DEFINES variable.
  149. X  
  150. X! 4. You probably won't want to include AFS support, in which case you
  151. X!    should empty all the variables starting with "AFS".  If you do want
  152. X!    to support AFS, then set the variables appropriately.
  153. X  
  154. X  
  155. X                 COM_ERR LIBRARY
  156. X  
  157. X! In order to compile delete, you need to get your hands on the com_err
  158. X! package, which was written by members of the MIT Student Information
  159. X! Processing Board (SIPB); it should be archived in the same place
  160. X! delete is.  You should compile the library and compile_et utility that
  161. X! comes with it and then either install them in a "standard location" on
  162. X! your machine or modify the delete Makefile so that it knows where they
  163. X! are.  The delete Makefile does not compile them by default, since they
  164. X! are already compiled and installed at Athena, so you should compile
  165. X! and install them separately from delete etc.
  166. X  
  167. X  The files texinfo.tex and com_err.texinfo in the et sources are
  168. X  compressed and uuencoded because they have control characters in them.
  169. X***************
  170. X*** 85,116 ****
  171. X  of them is necessary for just building the library and using it to
  172. X  build delete et al -- they are just documentation about the library.
  173. X  
  174. X- The version of the com_err library I've included here is "in flux" --
  175. X- its authors tell me that several enhancements are planned for the near
  176. X- future.  When the library is worked into a more final form, it will
  177. X- probably be distributed (to comp.sources.unix, etc.) separately from
  178. X- delete.
  179. X  
  180. X- 
  181. X                   FINAL NOTES
  182. X- 
  183. X- The final patch level used for the first release of this package was
  184. X- patch level 2.  Since this is a whole new release, and there were some
  185. X- unofficial patches here and there during the life of the first
  186. X- release, I upped the patch level to 5 for the first distribution of
  187. X- the second release of the delete package.
  188. X- 
  189. X- There were NO REAL PATCHES numbered 3, 4, or 5 -- I simply chose to
  190. X- jump from 2 to 5 when issuing a new release.  Therefore, if you have
  191. X- delete sources with a patch level less than 5, you will need to get a
  192. X- whole new copy of the sources.
  193. X- 
  194. X- In other words, treat patch level 5 as patch level 0 for all intents
  195. X- and purposes (gee, tha sounds stupid, but you get the idea :-).  See
  196. X- the file PATCHLEVEL in the sources to find out what patch level of the
  197. X- sources you currently have in your position (if you're reading this
  198. X- README file out of a source distribution, you almost definitely have
  199. X- patch level 6 or later).
  200. X  
  201. X  As usual, suggestions and bug fixes are always welcomed.
  202. X  
  203. X--- 80,87 ----
  204. X*** /tmp/,RCSt1018879    Fri Jun  8 00:10:46 1990
  205. X--- Makefile    Thu Jun  7 23:37:59 1990
  206. X***************
  207. X*** 5,11 ****
  208. X  #
  209. X  #     $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v $
  210. X  #     $Author: jik $
  211. X! #     $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v 1.17 89/12/20 15:14:34 jik Exp $
  212. X  #
  213. X  
  214. X  DESTDIR=
  215. X--- 5,11 ----
  216. X  #
  217. X  #     $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v $
  218. X  #     $Author: jik $
  219. X! #     $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v 1.22 90/06/07 23:36:17 jik Exp $
  220. X  #
  221. X  
  222. X  DESTDIR=
  223. X***************
  224. X*** 16,30 ****
  225. X  CC=         cc
  226. X  COMPILE_ET=     compile_et
  227. X  LINT=         lint
  228. X! DEFINES=    -DAFS_MOUNTPOINTS
  229. X! INCLUDES=    -I/usr/include\
  230. X!         -I/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/include
  231. X  CFLAGS=     -O $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
  232. X! LDFLAGS=    -L/usr/athena/lib\
  233. X!         -L/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/lib/afs
  234. X! LIBS=         -lcom_err -lsys
  235. X! LINTFLAGS=    $(DEFINES) $(INCLUDES) $(CDEBUGFLAGS) -u
  236. X  LINTLIBS=    
  237. X  SRCS=         delete.c undelete.c directories.c pattern.c util.c\
  238. X          expunge.c lsdel.c col.c shell_regexp.c\
  239. X          errors.c stack.c
  240. X--- 16,55 ----
  241. X  CC=         cc
  242. X  COMPILE_ET=     compile_et
  243. X  LINT=         lint
  244. X! DEFINES=    $(AFSDEFINES)
  245. X! 
  246. X! 
  247. X! # These variables apply only if you want this program to recognize
  248. X! # Andrew File System mount points.  If you don't want to support AFS,
  249. X! # then set all the variables starting with "AFS" to nothing.
  250. X! AFSBLD=        bld
  251. X! AFSINC=        /afs/athena.mit.edu/astaff/project/afsdev/sandbox/$(AFSBLD)/dest/include
  252. X! AFSLIB=        /afs/athena.mit.edu/astaff/project/afsdev/sandbox/$(AFSBLD)/dest/lib
  253. X! AFSINCS=    -I$(AFSINC)
  254. X! AFSLDFLAGS=    -L$(AFSLIB) -L$(AFSLIB)/afs
  255. X! AFSLIBS=    -lsys -lrx -llwp $(AFSLIB)/afs/util.a
  256. X! AFSDEFINES=    -DAFS_MOUNTPOINTS
  257. X! 
  258. X! 
  259. X! # ETINCS is a -I flag pointing to the directory in which the et header
  260. X! # files are stored. 
  261. X! # ETLDFLAGS is a -L flag pointing to the directory where the et
  262. X! # library is stored.
  263. X! # ETLIBS lists the et libraries we want to link against
  264. X! ETINCS=        -I/usr/include
  265. X! ETLDFLAGS=    -L/usr/athena/lib
  266. X! ETLIBS=        -lcom_err
  267. X! 
  268. X! 
  269. X! # You probably won't have to edit anything below this line.
  270. X! 
  271. X! INCLUDES=    $(ETINCS) $(AFSINCS)
  272. X! LDFLAGS=    $(ETLDFLAGS) $(AFSLDFLAGS) 
  273. X! LIBS=         $(ETLIBS) $(AFSLIBS)
  274. X  CFLAGS=     -O $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
  275. X! LINTFLAGS=    -u $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
  276. X  LINTLIBS=    
  277. X+ 
  278. X  SRCS=         delete.c undelete.c directories.c pattern.c util.c\
  279. X          expunge.c lsdel.c col.c shell_regexp.c\
  280. X          errors.c stack.c
  281. X***************
  282. X*** 37,48 ****
  283. X  MANS=         man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
  284. X          man1/undelete.1
  285. X  
  286. X! ETLIBSRCS=    et/Makefile et/com_err.3 et/compile_et.1\
  287. X!         et/com_err.texinfo.Z.uu et/error_table.y et/et_lex.lex.l\
  288. X!         et/texinfo.tex.Z.uu et/*.c et/*.h et/*.et
  289. X! ARCHIVE=    README Makefile PATCHLEVEL $(SRCS) $(INCS) $(ETSRCS)\
  290. X!         $(MANS) 
  291. X! ARCHIVEDIRS=     man1 et et/profiled
  292. X  
  293. X  DELETEOBJS=     delete.o util.o delete_errs.o errors.o
  294. X  UNDELETEOBJS=     undelete.o directories.o util.o pattern.o\
  295. X--- 62,70 ----
  296. X  MANS=         man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
  297. X          man1/undelete.1
  298. X  
  299. X! ARCHIVE=    README Makefile PATCHLEVEL $(SRCS) $(INCS) $(MANS)\
  300. X!         $(ETSRCS)
  301. X! ARCHIVEDIRS=     man1
  302. X  
  303. X  DELETEOBJS=     delete.o util.o delete_errs.o errors.o
  304. X  UNDELETEOBJS=     undelete.o directories.o util.o pattern.o\
  305. X***************
  306. X*** 138,144 ****
  307. X      tar cvf - $(ARCHIVE) $(ETLIBSRCS) | compress > delete.tar.Z
  308. X  
  309. X  shar: $(ARCHIVE)
  310. X!     makekit -oMANIFEST -h2 MANIFEST $(ARCHIVEDIRS) $(ARCHIVE) $(ETLIBSRCS)
  311. X  
  312. X  patch: $(ARCHIVE)
  313. X      makepatch $(ARCHIVE)
  314. X--- 160,166 ----
  315. X      tar cvf - $(ARCHIVE) $(ETLIBSRCS) | compress > delete.tar.Z
  316. X  
  317. X  shar: $(ARCHIVE)
  318. X!     makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE) $(ETLIBSRCS)
  319. X  
  320. X  patch: $(ARCHIVE)
  321. X      makepatch $(ARCHIVE)
  322. X*** /tmp/,RCSt1018886    Fri Jun  8 00:10:52 1990
  323. X--- PATCHLEVEL    Fri Jun  8 00:09:29 1990
  324. X***************
  325. X*** 1 ****
  326. X! 9
  327. X--- 1 ----
  328. X! 10
  329. X*** /tmp/,RCSt1018893    Fri Jun  8 00:10:58 1990
  330. X--- delete.c    Thu Jun  7 19:17:25 1990
  331. X***************
  332. X*** 11,17 ****
  333. X   */
  334. X  
  335. X  #if (!defined(lint) && !defined(SABER))
  336. X!      static char rcsid_delete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/delete.c,v 1.21 89/12/15 04:39:22 jik Exp $";
  337. X  #endif
  338. X  
  339. X  #include <sys/types.h>
  340. X--- 11,17 ----
  341. X   */
  342. X  
  343. X  #if (!defined(lint) && !defined(SABER))
  344. X!      static char rcsid_delete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/delete.c,v 1.22 90/06/06 19:06:17 jik Exp $";
  345. X  #endif
  346. X  
  347. X  #include <sys/types.h>
  348. X***************
  349. X*** 18,24 ****
  350. X--- 18,30 ----
  351. X  #include <stdio.h>
  352. X  #include <sys/stat.h>
  353. X  #include <sys/dir.h>
  354. X+ #ifdef SYSV
  355. X+ #include <string.h>
  356. X+ #define index strchr
  357. X+ #define rindex strrchr
  358. X+ #else
  359. X  #include <strings.h>
  360. X+ #endif /* SYSV */
  361. X  #include <sys/param.h>
  362. X  #include <sys/file.h>
  363. X  #include <errno.h>
  364. X*** /tmp/,RCSt1018900    Fri Jun  8 00:11:04 1990
  365. X--- undelete.c    Thu Jun  7 19:17:41 1990
  366. X***************
  367. X*** 11,17 ****
  368. X   */
  369. X  
  370. X  #if (!defined(lint) && !defined(SABER))
  371. X!      static char rcsid_undelete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/undelete.c,v 1.19 89/12/15 04:39:31 jik Exp $";
  372. X  #endif
  373. X  
  374. X  #include <stdio.h>
  375. X--- 11,17 ----
  376. X   */
  377. X  
  378. X  #if (!defined(lint) && !defined(SABER))
  379. X!      static char rcsid_undelete_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/undelete.c,v 1.20 90/06/06 19:06:43 jik Exp $";
  380. X  #endif
  381. X  
  382. X  #include <stdio.h>
  383. X***************
  384. X*** 18,24 ****
  385. X--- 18,30 ----
  386. X  #include <sys/types.h>
  387. X  #include <sys/dir.h>
  388. X  #include <sys/param.h>
  389. X+ #ifdef SYSV
  390. X+ #include <string.h>
  391. X+ #define index strchr
  392. X+ #define rindex strrchr
  393. X+ #else
  394. X  #include <strings.h>
  395. X+ #endif /* SYSV */
  396. X  #include <sys/stat.h>
  397. X  #include <com_err.h>
  398. X  #include <errno.h>
  399. X*** /tmp/,RCSt1018907    Fri Jun  8 00:11:10 1990
  400. X--- directories.c    Thu Jun  7 19:17:27 1990
  401. X***************
  402. X*** 11,17 ****
  403. X   */
  404. X  
  405. X  #if !defined(lint) && !defined(SABER)
  406. X!      static char rcsid_directories_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/directories.c,v 1.15 89/11/22 21:32:24 jik Exp $";
  407. X  #endif
  408. X  
  409. X  #include <stdio.h>
  410. X--- 11,17 ----
  411. X   */
  412. X  
  413. X  #if !defined(lint) && !defined(SABER)
  414. X!      static char rcsid_directories_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/directories.c,v 1.16 90/06/06 19:06:24 jik Exp $";
  415. X  #endif
  416. X  
  417. X  #include <stdio.h>
  418. X***************
  419. X*** 19,25 ****
  420. X--- 19,31 ----
  421. X  #include <sys/stat.h>
  422. X  #include <sys/param.h>
  423. X  #include <sys/dir.h>
  424. X+ #ifdef SYSV
  425. X+ #include <string.h>
  426. X+ #define index strchr
  427. X+ #define rindex strrchr
  428. X+ #else
  429. X  #include <strings.h>
  430. X+ #endif /* SYSV */
  431. X  #include <errno.h>
  432. X  #include <com_err.h>
  433. X  #include "delete_errs.h"
  434. X*** /tmp/,RCSt1018914    Fri Jun  8 00:11:18 1990
  435. X--- pattern.c    Thu Jun  7 22:33:55 1990
  436. X***************
  437. X*** 11,17 ****
  438. X   */
  439. X  
  440. X  #if (!defined(lint) && !defined(SABER))
  441. X!      static char rcsid_pattern_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/pattern.c,v 1.16 90/01/11 04:11:58 jik Exp $";
  442. X  #endif
  443. X  
  444. X  #include <stdio.h>
  445. X--- 11,17 ----
  446. X   */
  447. X  
  448. X  #if (!defined(lint) && !defined(SABER))
  449. X!      static char rcsid_pattern_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/pattern.c,v 1.18 90/06/07 22:33:45 jik Exp $";
  450. X  #endif
  451. X  
  452. X  #include <stdio.h>
  453. X***************
  454. X*** 18,24 ****
  455. X--- 18,30 ----
  456. X  #include <sys/types.h>
  457. X  #include <sys/dir.h>
  458. X  #include <sys/param.h>
  459. X+ #ifdef SYSV
  460. X+ #include <string.h>
  461. X+ #define index strchr
  462. X+ #define rindex strrchr
  463. X+ #else
  464. X  #include <strings.h>
  465. X+ #endif /* SYSV */
  466. X  #include <sys/stat.h>
  467. X  #include <errno.h>
  468. X  #include <com_err.h>
  469. X***************
  470. X*** 410,415 ****
  471. X--- 416,424 ----
  472. X       char first[MAXNAMLEN], rest[MAXPATHLEN];
  473. X       int retval;
  474. X       int strsize;
  475. X+ #ifdef PATTERN_DEBUG
  476. X+      int j;
  477. X+ #endif
  478. X       
  479. X  #ifdef DEBUG
  480. X       printf("do_match: looking for %s\n", name);
  481. X***************
  482. X*** 429,434 ****
  483. X--- 438,446 ----
  484. X       if (! *found) {
  485. X        set_error(errno);
  486. X        error("Malloc");
  487. X+ #ifdef PATTERN_DEBUG
  488. X+       fprintf(stderr, "do_match: return 1.\n");
  489. X+ #endif
  490. X        return error_code;
  491. X       }
  492. X       *num_found = 0;
  493. X***************
  494. X*** 437,442 ****
  495. X--- 449,457 ----
  496. X       if (! dirp) {
  497. X        set_error(errno);
  498. X        error(base);
  499. X+ #ifdef PATTERN_DEBUG
  500. X+       fprintf(stderr, "do_match: return 2.\n");
  501. X+ #endif
  502. X        return error_code;
  503. X       }
  504. X       (void) strcpy(first, firstpart(name, rest));
  505. X***************
  506. X*** 445,453 ****
  507. X--- 460,474 ----
  508. X        if (retval) {
  509. X             error("add_str");
  510. X             (void) popall();
  511. X+ #ifdef PATTERN_DEBUG
  512. X+            fprintf(stderr, "do_match: return 3.\n");
  513. X+ #endif
  514. X             return retval;
  515. X        }
  516. X        (*num_found)++;
  517. X+ #ifdef PATTERN_DEBUG
  518. X+       fprintf(stderr, "do_match: return 4.\n");
  519. X+ #endif
  520. X        return 0;
  521. X       }
  522. X       
  523. X***************
  524. X*** 456,461 ****
  525. X--- 477,486 ----
  526. X        if (! dp) goto updir;
  527. X  
  528. X        retval = reg_cmp(first, dp->d_name);
  529. X+ #ifdef PATTERN_DEBUG
  530. X+     fprintf(stderr, "do_match: comparing %s to %s returns %d.\n",
  531. X+         first, dp->d_name, retval);
  532. X+ #endif
  533. X        if (retval < 0) {
  534. X             error("reg_cmp");
  535. X             goto updir;
  536. X***************
  537. X*** 465,470 ****
  538. X--- 490,500 ----
  539. X  
  540. X        if (is_deleted(dp->d_name) && match_deleted) {
  541. X             retval = reg_cmp(first, &dp->d_name[2]);
  542. X+ #ifdef PATTERN_DEBUG
  543. X+            fprintf(stderr,
  544. X+                "do_match: deleted compare of %s to %s returns %d.\n",
  545. X+                first, &dp->d_name[2], retval);
  546. X+ #endif
  547. X             if (retval < 0) {
  548. X              error("reg_cmp");
  549. X              goto updir;
  550. X***************
  551. X*** 479,490 ****
  552. X--- 509,529 ----
  553. X             continue;
  554. X  
  555. X       downdir:
  556. X+ #ifdef PATTERN_DEBUG
  557. X+       fprintf(stderr, "do_match: downdir\n");
  558. X+ #endif
  559. X        retval = push(&dirp, sizeof(DIR *));
  560. X        if (retval) {
  561. X             error("push");
  562. X             (void) popall();
  563. X+ #ifdef PATTERN_DEBUG
  564. X+            fprintf(stderr, "do_match: return 5.\n");
  565. X+ #endif
  566. X             return retval;
  567. X        }
  568. X+ #ifdef PATTERN_DEBUG
  569. X+       fprintf(stderr, "do_match: pushing %s, %s, %s\n", first, rest, base);
  570. X+ #endif
  571. X        string_push(first);
  572. X        string_push(rest);
  573. X        string_push(base);
  574. X***************
  575. X*** 497,502 ****
  576. X--- 536,544 ----
  577. X               if (retval) {
  578. X                    error("add_str");
  579. X                    (void) popall();
  580. X+ #ifdef PATTERN_DEBUG
  581. X+                   fprintf(stderr, "do_match: return 6.\n");
  582. X+ #endif
  583. X                    return retval;
  584. X               }
  585. X               (*num_found)++;
  586. X***************
  587. X*** 507,512 ****
  588. X--- 549,557 ----
  589. X              if (retval) {
  590. X               error("add_str");
  591. X               (void) popall();
  592. X+ #ifdef PATTERN_DEBUG
  593. X+              fprintf(stderr, "do_match: return 7.\n");
  594. X+ #endif
  595. X               return retval;
  596. X              }
  597. X              (*num_found)++;
  598. X***************
  599. X*** 514,519 ****
  600. X--- 559,568 ----
  601. X             string_pop(base);
  602. X             string_pop(rest);
  603. X             string_pop(first);
  604. X+ #ifdef PATTERN_DEBUG
  605. X+            fprintf(stderr, "do_match: popped %s, %s, %s\n", first,
  606. X+                rest, base);
  607. X+ #endif
  608. X             (void) pop(&dirp, sizeof(DIR *));
  609. X             continue;
  610. X        }
  611. X***************
  612. X*** 527,532 ****
  613. X--- 576,585 ----
  614. X             string_pop(base);
  615. X             string_pop(rest);
  616. X             string_pop(first);
  617. X+ #ifdef PATTERN_DEBUG
  618. X+            fprintf(stderr, "do_match: popped %s, %s, %s\n", first,
  619. X+                rest, base);
  620. X+ #endif
  621. X             (void) pop(&dirp, sizeof(DIR *));
  622. X             continue;
  623. X        }
  624. X***************
  625. X*** 534,555 ****
  626. X--- 587,631 ----
  627. X             continue;
  628. X  
  629. X       updir:
  630. X+ #ifdef PATTERN_DEBUG
  631. X+       fprintf(stderr, "do_match: updir\n");
  632. X+ #endif
  633. X        closedir(dirp);
  634. X        string_pop(base);
  635. X+ #ifdef PATTERN_DEBUG
  636. X+       fprintf(stderr, "do_match: popped %s\n", base);
  637. X+ #endif
  638. X        if (retval) {
  639. X             if (retval != STACK_EMPTY) {
  640. X              error("pop");
  641. X              (void) popall();
  642. X+ #ifdef PATTERN_DEBUG
  643. X+             fprintf(stderr, "do_match: return 8.\n");
  644. X+ #endif
  645. X              return retval;
  646. X             }
  647. X+ #ifdef PATTERN_DEBUG
  648. X+            fprintf(stderr, "Returning %d word%s from do_match:\n",
  649. X+                *num_found,
  650. X+                *num_found == 1 ? "" : "s");
  651. X+            for (j = 0; j < *num_found; j++)
  652. X+             fprintf(stderr, "\t%s\n", (*found)[j]);
  653. X+            fprintf(stderr, "do_match: return 9.\n");
  654. X+ #endif
  655. X             return 0;
  656. X        }
  657. X        string_pop(rest);
  658. X        string_pop(first);
  659. X+ #ifdef PATTERN_DEBUG
  660. X+       fprintf(stderr, "do_match: popped %s, %s\n", rest, first);
  661. X+ #endif
  662. X        retval = pop(&dirp, sizeof(DIR *));
  663. X        if (retval) {
  664. X             error("pop");
  665. X             (void) popall();
  666. X+ #ifdef PATTERN_DEBUG
  667. X+            fprintf(stderr, "do_match: return 10.\n");
  668. X+ #endif
  669. X             return retval;
  670. X        }
  671. X        continue;
  672. X*** /tmp/,RCSt1018921    Fri Jun  8 00:11:28 1990
  673. X--- util.c    Thu Jun  7 19:17:42 1990
  674. X***************
  675. X*** 11,25 ****
  676. X   */
  677. X  
  678. X  #if (!defined(lint) && !defined(SABER))
  679. X!      static char rcsid_util_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.c,v 1.15 90/01/11 03:47:11 jik Exp $";
  680. X  #endif
  681. X  
  682. X  #include <stdio.h>
  683. X  #include <sys/param.h>
  684. X  #include <sys/types.h>
  685. X  #include <sys/stat.h>
  686. X  #include <sys/dir.h>
  687. X  #include <strings.h>
  688. X  #include <pwd.h>
  689. X  #include <errno.h>
  690. X  #ifdef AFS_MOUNTPOINTS
  691. X--- 11,34 ----
  692. X   */
  693. X  
  694. X  #if (!defined(lint) && !defined(SABER))
  695. X!      static char rcsid_util_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/util.c,v 1.17 90/06/07 13:05:30 jik Exp $";
  696. X  #endif
  697. X  
  698. X  #include <stdio.h>
  699. X  #include <sys/param.h>
  700. X  #include <sys/types.h>
  701. X+ #ifdef SYSV /* SYSV doesn't define uid_t */
  702. X+ typedef unsigned short uid_t;
  703. X+ #endif
  704. X  #include <sys/stat.h>
  705. X  #include <sys/dir.h>
  706. X+ #ifdef SYSV
  707. X+ #include <string.h>
  708. X+ #define index strchr
  709. X+ #define rindex strrchr
  710. X+ #else
  711. X  #include <strings.h>
  712. X+ #endif /* SYSV */
  713. X  #include <pwd.h>
  714. X  #include <errno.h>
  715. X  #ifdef AFS_MOUNTPOINTS
  716. X*** /tmp/,RCSt1018928    Fri Jun  8 00:11:36 1990
  717. X--- expunge.c    Thu Jun  7 19:17:30 1990
  718. X***************
  719. X*** 11,17 ****
  720. X   */
  721. X  
  722. X  #if (!defined(lint) && !defined(SABER))
  723. X!      static char rcsid_expunge_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/expunge.c,v 1.13 89/12/28 14:45:15 jik Exp $";
  724. X  #endif
  725. X  
  726. X  #include <stdio.h>
  727. X--- 11,17 ----
  728. X   */
  729. X  
  730. X  #if (!defined(lint) && !defined(SABER))
  731. X!      static char rcsid_expunge_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/expunge.c,v 1.14 90/06/06 19:06:29 jik Exp $";
  732. X  #endif
  733. X  
  734. X  #include <stdio.h>
  735. X***************
  736. X*** 19,25 ****
  737. X--- 19,31 ----
  738. X  #include <sys/time.h>
  739. X  #include <sys/dir.h>
  740. X  #include <sys/param.h>
  741. X+ #ifdef SYSV
  742. X+ #include <string.h>
  743. X+ #define index strchr
  744. X+ #define rindex strrchr
  745. X+ #else
  746. X  #include <strings.h>
  747. X+ #endif /* SYSV */
  748. X  #include <sys/stat.h>
  749. X  #include <com_err.h>
  750. X  #include <errno.h>
  751. X*** /tmp/,RCSt1018935    Fri Jun  8 00:11:43 1990
  752. X--- lsdel.c    Thu Jun  7 22:31:48 1990
  753. X***************
  754. X*** 11,17 ****
  755. X   */
  756. X  
  757. X  #if (!defined(lint) && !defined(SABER))
  758. X!      static char rcsid_lsdel_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/lsdel.c,v 1.9 89/11/22 21:31:08 jik Exp $";
  759. X  #endif
  760. X  
  761. X  #include <stdio.h>
  762. X--- 11,17 ----
  763. X   */
  764. X  
  765. X  #if (!defined(lint) && !defined(SABER))
  766. X!      static char rcsid_lsdel_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/lsdel.c,v 1.11 90/06/07 22:31:31 jik Exp $";
  767. X  #endif
  768. X  
  769. X  #include <stdio.h>
  770. X***************
  771. X*** 19,25 ****
  772. X--- 19,34 ----
  773. X  #include <sys/dir.h>
  774. X  #include <sys/param.h>
  775. X  #include <sys/stat.h>
  776. X+ #ifdef SYSV
  777. X+ #include <string.h>
  778. X+ #define index strchr
  779. X+ #define rindex strrchr
  780. X+ #else
  781. X  #include <strings.h>
  782. X+ #endif /* SYSV */
  783. X+ #ifdef _AUX_SOURCE
  784. X+ extern char *strcmp();
  785. X+ #endif
  786. X  #include <errno.h>
  787. X  #include <com_err.h>
  788. X  #include "col.h"
  789. X*** /tmp/,RCSt1018942    Fri Jun  8 00:11:51 1990
  790. X--- col.c    Thu Jun  7 19:17:24 1990
  791. X***************
  792. X*** 11,17 ****
  793. X   */
  794. X  
  795. X  #if (!defined(lint) && !defined(SABER))
  796. X!      static char rcsid_col_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/col.c,v 1.6 89/11/22 21:24:21 jik Exp $";
  797. X  #endif
  798. X  
  799. X  /*
  800. X--- 11,17 ----
  801. X   */
  802. X  
  803. X  #if (!defined(lint) && !defined(SABER))
  804. X!      static char rcsid_col_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/col.c,v 1.7 90/06/06 19:05:56 jik Exp $";
  805. X  #endif
  806. X  
  807. X  /*
  808. X***************
  809. X*** 21,27 ****
  810. X--- 21,33 ----
  811. X   */
  812. X  
  813. X  #include <stdio.h>
  814. X+ #ifdef SYSV
  815. X+ #include <string.h>
  816. X+ #define index strchr
  817. X+ #define rindex strrchr
  818. X+ #else
  819. X  #include <strings.h>
  820. X+ #endif /* SYSV */
  821. X  #include "errors.h"
  822. X  #include "delete_errs.h"
  823. X  #include "col.h"
  824. X*** /tmp/,RCSt1018963    Fri Jun  8 00:12:07 1990
  825. X--- stack.c    Thu Jun  7 22:35:00 1990
  826. X***************
  827. X*** 11,17 ****
  828. X   */
  829. X  
  830. X  #if (!defined(lint) && !defined(SABER))
  831. X!      static char rcsid_stack_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/stack.c,v 1.5 89/12/11 03:32:37 jik Exp $";
  832. X  #endif
  833. X  
  834. X  #include <sys/types.h>
  835. X--- 11,17 ----
  836. X   */
  837. X  
  838. X  #if (!defined(lint) && !defined(SABER))
  839. X!      static char rcsid_stack_c[] = "$Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/stack.c,v 1.7 90/06/07 22:34:48 jik Exp $";
  840. X  #endif
  841. X  
  842. X  #include <sys/types.h>
  843. X***************
  844. X*** 36,42 ****
  845. X  {
  846. X       static caddr_t stack = (caddr_t) NULL;
  847. X       static int size = 0, count = 0;
  848. X! 
  849. X       switch (op) {
  850. X       case EMPTY_STACK:
  851. X        if (size) {
  852. X--- 36,42 ----
  853. X  {
  854. X       static caddr_t stack = (caddr_t) NULL;
  855. X       static int size = 0, count = 0;
  856. X!      
  857. X       switch (op) {
  858. X       case EMPTY_STACK:
  859. X        if (size) {
  860. X***************
  861. X*** 44,53 ****
  862. X             stack = (caddr_t) NULL;
  863. X             size = count = 0;
  864. X        }
  865. X        return 0;
  866. X       case STACK_PUSH:
  867. X!       if (bytes == 0)
  868. X             return 0;
  869. X        if (size - count < bytes) {
  870. X             do
  871. X              size += STACK_INC;
  872. X--- 44,61 ----
  873. X             stack = (caddr_t) NULL;
  874. X             size = count = 0;
  875. X        }
  876. X+ #ifdef STACK_DEBUG
  877. X+       fprintf(stderr, "dostack: return 1 (EMPTY_STACK).\n");
  878. X+ #endif
  879. X        return 0;
  880. X       case STACK_PUSH:
  881. X!       if (bytes == 0) {
  882. X! #ifdef STACK_DEBUG
  883. X!            fprintf(stderr, "Pushing 0 bytes at %d offset.\n", count);
  884. X!            fprintf(stderr, "dostack: return 2 (STACK_PUSH).\n");
  885. X! #endif
  886. X             return 0;
  887. X+       }
  888. X        if (size - count < bytes) {
  889. X             do
  890. X              size += STACK_INC;
  891. X***************
  892. X*** 59,75 ****
  893. X              size = count = 0;
  894. X              set_error(errno);
  895. X              error("Malloc");
  896. X              return error_code;
  897. X             }
  898. X        }
  899. X        bcopy(data, stack + count, bytes);
  900. X        count += bytes;
  901. X        return 0;
  902. X       case STACK_POP:
  903. X!       if (bytes == 0)
  904. X             return 0;
  905. X        if (count == 0) {
  906. X             set_status(STACK_EMPTY);
  907. X             return error_code;
  908. X        }
  909. X        else {
  910. X--- 67,104 ----
  911. X              size = count = 0;
  912. X              set_error(errno);
  913. X              error("Malloc");
  914. X+ #ifdef STACK_DEBUG
  915. X+             fprintf(stderr, "dostack: return 3 (STACK_PUSH).\n");
  916. X+ #endif
  917. X              return error_code;
  918. X             }
  919. X        }
  920. X+ #ifdef STACK_DEBUG
  921. X+       fprintf(stderr, "Pushing %d bytes at %d offset.\n", bytes, count);
  922. X+ #endif
  923. X+ #if defined(SYSV) || (defined(__STDC__) && !defined(__HIGHC__))
  924. X+       memcpy(stack + count, data, bytes);
  925. X+ #else
  926. X        bcopy(data, stack + count, bytes);
  927. X+ #endif
  928. X        count += bytes;
  929. X+ #ifdef STACK_DEBUG
  930. X+       fprintf(stderr, "dostack: return 4 (STACK_PUSH).\n");
  931. X+ #endif
  932. X        return 0;
  933. X       case STACK_POP:
  934. X!       if (bytes == 0) {
  935. X! #ifdef STACK_DEBUG
  936. X!            fprintf(stderr, "Popping 0 bytes at %d offset.\n", count);
  937. X!            fprintf(stderr, "dostack: return 5 (STACK_POP).\n");
  938. X! #endif
  939. X             return 0;
  940. X+       }
  941. X        if (count == 0) {
  942. X             set_status(STACK_EMPTY);
  943. X+ #ifdef STACK_DEBUG
  944. X+            fprintf(stderr, "dostack: return 6 (STACK_POP).\n");
  945. X+ #endif
  946. X             return error_code;
  947. X        }
  948. X        else {
  949. X***************
  950. X*** 76,82 ****
  951. X--- 105,119 ----
  952. X             int newblocks, newsize;
  953. X  
  954. X             count -= bytes;
  955. X+ #ifdef STACK_DEBUG
  956. X+            fprintf(stderr, "Popping %d bytes at %d offset.\n", bytes,
  957. X+                count);
  958. X+ #endif
  959. X+ #if defined(SYSV) || (defined(__STDC__) && !defined(__HIGHC__))
  960. X+            memcpy(data, stack + count, bytes);
  961. X+ #else
  962. X             bcopy(stack + count, data, bytes);
  963. X+ #endif
  964. X             newblocks = count / STACK_INC + ((count % STACK_INC) ? 1 : 0);
  965. X             newsize = newblocks * STACK_INC;
  966. X             if (newsize < size) {
  967. X***************
  968. X*** 85,97 ****
  969. X--- 122,143 ----
  970. X              if (! stack) {
  971. X               set_error(errno);
  972. X               error("realloc");
  973. X+ #ifdef STACK_DEBUG
  974. X+              fprintf(stderr, "dostack: return 7 (STACK_POP).\n");
  975. X+ #endif
  976. X               return error_code;
  977. X              }
  978. X             }
  979. X+ #ifdef STACK_DEBUG
  980. X+            fprintf(stderr, "dostack: return 8 (STACK_POP).\n");
  981. X+ #endif
  982. X             return 0;
  983. X        }
  984. X       default:
  985. X        set_error(STACK_BAD_OP);
  986. X+ #ifdef STACK_DEBUG
  987. X+       fprintf(stderr, "dostack: return 9.\n");
  988. X+ #endif
  989. X        return error_code;
  990. X       }
  991. X  }
  992. END_OF_FILE
  993. if test 27287 -ne `wc -c <'delete.patch10'`; then
  994.     echo shar: \"'delete.patch10'\" unpacked with wrong size!
  995. fi
  996. # end of 'delete.patch10'
  997. fi
  998. echo shar: End of shell archive.
  999. exit 0
  1000.  
  1001. exit 0 # Just in case...
  1002.